﻿using System;

namespace QuickTest.Core.TestRunner
{
    /// <summary>
    /// The argument used for test events.
    /// </summary>
    [Serializable]
    public class TestEventArgs : EventArgs
    {
        /// <summary>
        /// The result of a test.
        /// </summary>
        public TestResult Result { get; private set; }

        public TestEventArgs(TestResult result)
        {
            Result = result;
        }
    }

    /// <summary>
    /// The argument used for the run started event.
    /// </summary>
    [Serializable]
    public class TestRunStartedEventArgs : EventArgs
    {
        /// <summary>
        /// Gets the number of tests to run.
        /// </summary>
        public int TestCount { get; private set; }

        public TestRunStartedEventArgs(int testCount)
        {
            TestCount = testCount;
        }
    }

    /// <summary>
    /// The argument used for the run finished event.
    /// </summary>
    [Serializable]
    public class TestRunFinishedEventArgs : EventArgs
    {
        public int ResultCount { get; private set; }
        public int SuccessCount { get; private set; }
        public int FailureCount { get; private set; }
        public int NotRunCount { get; private set; }

        public TestRunFinishedEventArgs(int testCount, int successCount, int failureCount, int notRunCount)
        {
            ResultCount = testCount;
            SuccessCount = successCount;
            FailureCount = failureCount;
            NotRunCount = notRunCount;
        }
    }
}